package com.ruoyi.web.controller.xcx;

import com.ruoyi.common.annotation.ResultFilter;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.ATrainInfor;
import com.ruoyi.system.domain.vo.HgATrainInforVO;
import com.ruoyi.system.service.IATrainInforService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 培训类别Controller
 *
 * @author ruoyi
 * @date 2024-05-29
 */
@RestController
@RequestMapping("/xcx/aTrainInfor")
public class XcxATrainInfor extends BaseController {

    @Autowired
    private IATrainInforService aTrainInforService;

    /**
     * 查询资料列表
     */
    @GetMapping("/xcxList")
    @ResultFilter
    public TableDataInfo xcxList(HgATrainInforVO hgATrainInforVO)
    {
        startPage();
        List<HgATrainInforVO> list = aTrainInforService.selectATrainInforXcxList(hgATrainInforVO);
        return getDataTable(list);
    }

    /**
     * 根据id 查询详情
     */
    @GetMapping("/xcxGetInfor")
    @ResultFilter
    public AjaxResult xcxGetInfor(Long id)
    {
        return success(aTrainInforService.selectATrainInforXcxById(id));
    }


    /**
     * 核对 密码
     */
    @GetMapping("/checkWord")
    public AjaxResult checkWord(ATrainInfor aTrainInfor)
    {
        return success(aTrainInforService.checkWord(aTrainInfor));
    }
}
